<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // console.log(Number.isFinite(1)); //有限数

        // console.log(Number.isFinite(1/0)); //无限数

        // let num = 'a123'-1;

        // // 判断是否是NaN
        // console.log(Number.isNaN(num));


        // 判断是否为整数
        // let num = 123.2;

        // console.log(Number.isInteger(num));

        // 将字符串转成数字
        // let str = '123.3abc';

        // console.log(Number.parseInt(str));
        // console.log(Number.parseFloat(str));



    </script>
</body>
</html>